From: Jonathan Lebon Date: Mon, 11 Sep 2017 21:06:30 +0000 (+0000) Subject: bin/remote: don't load repo on root command X-Git-Tag: archive/raspbian/2022.1-3+rpi1~1^2~4^2~32^2~6 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22Program/%22http:/www.example.com/cgi/%22https:/%22Program?a=commitdiff_plain;h=4cc813133c5aa074d2d2664fb57b9edb74c610c8;p=ostree.git bin/remote: don't load repo on root command Subcommands will demand a repo argument themselves. This allows one to call `ostree remote` and get the "No subcommand" error rather than the "Missing --repo" error. Closes: #1126 Approved by: cgwalters --- diff --git a/src/ostree/ot-builtin-remote.c b/src/ostree/ot-builtin-remote.c index dd999c01..9d290d09 100644 --- a/src/ostree/ot-builtin-remote.c +++ b/src/ostree/ot-builtin-remote.c @@ -115,7 +115,8 @@ ostree_builtin_remote (int argc, char **argv, GCancellable *cancellable, GError /* This will not return for some options (e.g. --version). */ if (ostree_option_context_parse (context, NULL, &argc, &argv, - OSTREE_BUILTIN_FLAG_NONE, NULL, cancellable, error)) + OSTREE_BUILTIN_FLAG_NO_REPO, NULL, cancellable, + error)) { if (subcommand_name == NULL) {